package home.app.t1;

import android.app.ListActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Toast;

/**
 * Created with IntelliJ IDEA.
 * User: Kitsune
 * Date: 30-03-13
 * Time: 01:23 PM
 * To change this template use File | Settings | File Templates.
 */
public class Puntuaciones extends ListActivity{
             @Override public void onCreate(Bundle savedInstanceState)
             {
                 super.onCreate(savedInstanceState);
                 setContentView(R.layout.puntuaciones);
                 setListAdapter(new ArrayAdapter<String>(this,
                         R.layout.element_list,
                         R.id.titulo,databaseList()
           //              HelloWorld.almacen.listaPuntuaciones(10)
           ));

             }
    @Override protected void onListItemClick(ListView listView,
                                             View view, int position, long id) {
        super.onListItemClick(listView, view, position, id);
        Object o = getListAdapter().getItem(position);

        Toast.makeText(this, "Selección: " + Integer.toString(position)
                +  " - " + o.toString(),Toast.LENGTH_LONG).show();
    }



}
